package com.qiaofang.applet.service.member.service;

import com.qiaofang.applet.common.base.BaseService;
import com.qiaofang.applet.service.member.domain.MemberSubscribe;
import com.qiaofang.applet.service.member.service.dto.MemberSubscribeDetailDto;
import com.qiaofang.applet.service.member.service.dto.MemberSubscribeQueryDto;
import com.qiaofang.applet.service.member.service.dto.MemberSubscribeSaveDto;
import com.qiaofang.applet.service.member.service.dto.UpdateSubscribeStatusDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author daiyuxiang
 */
public interface MemberSubscribeService extends BaseService<MemberSubscribe, String> {

    Page<MemberSubscribeDetailDto> listMemberSubscribe(MemberSubscribeQueryDto queryDto, Pageable pageable);

    /**
     * 更新订阅状态
     *
     * @param updateSubscribeStatusDto
     */
    void updateSubscribeStatus(UpdateSubscribeStatusDto updateSubscribeStatusDto);


    MemberSubscribe saveByParams(MemberSubscribeSaveDto saveDto, String subscribeStatus);

    Page<MemberSubscribe> findEstateUniqueUuidListByParams(MemberSubscribeQueryDto queryDto, Pageable pageable);

    List<MemberSubscribe> findEstateUniqueUuidListByParams(MemberSubscribeQueryDto queryDto);

    MemberSubscribe findByMemberIdAndEstateUniqueUuid(String memberId, String estateUniqueUuid);

    void deleteByMemberIdAndEstateUniqueUuid(String memberId, String estateUniqueUuid);

    /**
     * 定时发送楼盘开盘短信
     */
    void sendMessagesTask(String corporationCode);

}
